<?php

ini_set('display_errors', 1);
require_once '/data/wwwroot/g_vendor/autoload.php';


$brandId = $argv[1] ?? 0;
$dayCount = $argv[2] ?? 7;
$where = $brandId ? ['id' => $brandId] : [];
$list = \Biz\model\brand\Brand::select('*', $where);
$brand_ids = array_column($list, 'id');
$map = array_column($list, null, 'id');
\Biz\service\brand\BrandGrowth::lost($brand_ids, $map, $dayCount);